/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package net.worlds.object;

import java.awt.Color;
import net.worlds.WorldsException;
import net.worlds.PropChangeHandler;
import net.worlds.ui.edge.EFrame;


public class UIFrame extends UIComponent{
    public UIFrame() throws WorldsException
    {
        super("UIFrame");
        component = new EFrame(null, 0, 0, 0, 0);
        addPropChangeHandler("BackgroundColor", new PropChangeHandler()
        {
            @Override
            public void handle(Object oldValue, Object value) throws WorldsException {
                ((EFrame)component).setBackgroundColor(((Color)value));
            }
        });
        addPropChangeHandler("BorderColor", new PropChangeHandler()
        {
            @Override
            public void handle(Object oldValue, Object value) throws WorldsException {
                ((EFrame)component).setBorderColor(((Color)value));
            }
        });
        addPropChangeHandler("Undecorated", new PropChangeHandler()
        {
            @Override
            public void handle(Object oldValue, Object value) throws WorldsException {
                ((EFrame)component).setUndecorated((Boolean)value);
            }
        });
    }
}
